public class Placar{
  color barraCor,fontColor;
  PFont font;
  float x,y,tX,tY,h,w;
  String name;
  int fontSize;
  
  
  
  Placar(){
    font = loadFont("fontes//ComicSansMS-48.vlw");
    fontSize=12;
    barraCor = color(255,255,255,50);
    fontColor = color(255,255,255);
    h=25;
    y=h/2;
    tY=15;
    w=width/5;  
  }
  
  void game(int power, int level){
    w=width;
    x=width/2;
    tX = x-16*3;
    fill(barraCor);
    
    rectMode(CENTER);
    rect(x, y, w, h);
    fill(fontColor);
    textFont(font,fontSize);
    text("POWER:"+power, x-width/5/2+5, tY);
    text("LEVEL:"+level, x+5, tY);
  }
  
  void player(Player p){
    tY=10;
    tX=x;
    fill(p.cor,80);
   // rect(x+w/2, y, w, h);
    fill(fontColor);
    textFont(font,fontSize);
    text(p.nome,tX,tY);
    
    text("Vida:"+p.vida,tX+50,tY);
    
    //text("Power:"+p.powerBall,tX,tY+12);
    
   // text("Magnetic:"+p.magneticPower,tX+50,tY+12);
  }
  
}
